package edu.ubbcs.rs.backend.repository;

import edu.ubbcs.rs.backend.model.AbstractModel;
import java.util.List;
import javax.ejb.Local;

/**
 *
 * @author Merli András-Bertalan
 */
@Local
public interface BaseRepository<T extends AbstractModel, I> {
    
    List<T> getAll () throws RepositoryException;
    
    T getById (I id) throws RepositoryException;
    
    void insert (T item) throws RepositoryException;
    
    void update (T item) throws RepositoryException;
    
    void delete (T item) throws RepositoryException;
    
    void deleteAll () throws RepositoryException;
    
    Long getCount () throws RepositoryException;
}
